home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1995 #5 & #6
/
Amiga Plus CD - 1995 - No. 5 and 6.iso
/
pd
/
serien
/
purity
/
nr.45
/
katalog
/
localetest.p
< prev
next >
Wrap
Text File
|
1995-03-07
|
1KB
|
58 lines
Program LocaleDemo;
{ 1994/95 by Andreas Tetzl & Røgersøft }
{ Public Domain }
{ Für OS2.1+ }
{$Include 'locale.lib','Exec.Lib'}
TYPE deftyp=ARRAY[0..3] OF STRING;
VAR Loc : p_Locale;
Cat : p_Catalog;
StrNum : Integer;
Str : String;
VAR Defstrings:deftyp;
Procedure CleanExit(Why : String; RC : Integer);
Begin
If cat<>NIL then CloseCatalog(cat);
If loc<>NIL then CloseLocale(loc);
If LocaleBase<>NIL then CloseLibrary(LocaleBase);
If Why<>'' then Writeln(Why);
delay(10*50); { 10 sekunden zum lesen}
close(input);
HALT(RC);
end;
Begin
DefStrings:=deftyp("LocaleDemo V1.1 1994/95 by Andreas Tetzl & Røgersøft",
"This program demonstrates the use of the locale.library.",
"This is the default text.",
"Ten seconds time to read this msg.");
Reset(input,'CON:0/0/400/200/Catalogtester');
output:=input;
{ Als erstes die locale.library öffnen. }
LocaleBase := OpenLibrary("locale.library", 38);
If LocaleBase=NIL then CleanExit("Benötige OS2.1+",10);
{ Zugriff auf die voreingestellte Sprache. }
{ Sollte für dieses Programm Deutsch sein. }
loc := OpenLocale(NIL);
If loc=NIL then CleanExit("Keinen Zugriff auf voreingestellte Sprache",10);
cat := OpenCatalogA(loc, "example.catalog", NIL);
For StrNum:=0 to 3 do
Begin
Str := DefStrings[StrNum];
If cat<>NIL then Str := GetCatalogStr(cat, StrNum, "Catalog fehlerhaft.");
Writeln(Str);
end;
CleanExit('',0);
end.